import { createApp } from 'vue';
import { createPinia } from 'pinia';
import Antd from 'ant-design-vue';
import 'ant-design-vue/dist/antd.css';
import App from './App.vue';
import router from './router';

// 导入图标
import {
  HomeOutlined,
  UserOutlined,
  SettingOutlined,
  EditOutlined,
  EyeOutlined,
  MessageOutlined,
  CalendarOutlined,
  TagOutlined,
  FileTextOutlined,
  LikeOutlined,
  ShareAltOutlined,
  GithubOutlined,
  TwitterOutlined,
  MailOutlined,
  PhoneOutlined,
  EnvironmentOutlined,
  LockOutlined,
  LogoutOutlined,
  MenuOutlined,
  CloseOutlined,
  SearchOutlined,
  PictureOutlined,
  UploadOutlined,
  DeleteOutlined,
  CheckOutlined,
  InfoCircleOutlined,
  BarsOutlined,
  AppstoreOutlined,
  TeamOutlined,
  BookOutlined,
  CommentOutlined,
  HeartOutlined,
  ClockCircleOutlined,
  LinkOutlined,
  GlobalOutlined
} from '@ant-design/icons-vue';

const app = createApp(App);
const pinia = createPinia();

// 注册图标组件
const icons = {
  HomeOutlined,
  UserOutlined,
  SettingOutlined,
  EditOutlined,
  EyeOutlined,
  MessageOutlined,
  CalendarOutlined,
  TagOutlined,
  FileTextOutlined,
  LikeOutlined,
  ShareAltOutlined,
  GithubOutlined,
  TwitterOutlined,
  MailOutlined,
  PhoneOutlined,
  EnvironmentOutlined,
  LockOutlined,
  LogoutOutlined,
  MenuOutlined,
  CloseOutlined,
  SearchOutlined,
  PictureOutlined,
  UploadOutlined,
  DeleteOutlined,
  CheckOutlined,
  InfoCircleOutlined,
  BarsOutlined,
  AppstoreOutlined,
  TeamOutlined,
  BookOutlined,
  CommentOutlined,
  HeartOutlined,
  ClockCircleOutlined,
  LinkOutlined,
  GlobalOutlined
};

// 全局注册所有图标
Object.keys(icons).forEach(key => {
  app.component(key, icons[key]);
});

app.use(pinia);
app.use(router);
app.use(Antd);

app.mount('#app'); 